package cj.web.portal.dao;
/*
 *  
 *  
*/
import java.util.List;
import java.util.Map;
import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;

/**
 * 
 * @author 
 *
 */
@DAO
public interface VideoVoDAO{
	
	@SQL("SELECT id,type,categoryIds,categoryDescs,name,url,img,orderNo FROM video WHERE categoryIds like '%##(:1)%' AND deleteFlag = 1 ORDER BY orderNo LIMIT :2,:3 ")
    List<Map> queryVideolis(String categoryIds,int start,int length);
    
    @SQL("SELECT count(1) FROM video WHERE categoryIds like '%##(:1)%' AND deleteFlag = 1 ")
    int queryVideoSize(String categoryIds);
    
    @SQL("SELECT a.id,a.type,a.categoryIds,a.name,a.url,a.img,a.orderNo,a.categoryDescs FROM video a left join category b on a.categoryIds=b.id WHERE a.deleteFlag = 1 AND a.id = :1 ")
    List<Map> queryVideoDetail(int id);
    
    @SQL("SELECT id,type,categoryIds,categoryDescs,name,url,img,orderNo FROM video WHERE categoryIds like '%##(:1)%' AND deleteFlag = 1 ORDER BY orderNo ")
    List<Map> queryVideolis(String categoryIds);
}